package com.fzkj.shejimoshi.factory.abstractfactory;

import com.fzkj.shejimoshi.factory.abstractfactory.phone.ApplePhone;
import com.fzkj.shejimoshi.factory.abstractfactory.phonefactory.AbstractPhoneFactory;
import com.fzkj.shejimoshi.factory.abstractfactory.phonefactory.PhoneFactory;
import com.fzkj.shejimoshi.factory.abstractfactory.phone.AndroidPhone;
import com.fzkj.shejimoshi.factory.abstractfactory.phone.Phone;

/**
 * @DESCRIPTION: TODO 抽象工厂模式测试
 * @AUTHOR: AnotherOne
 * @DATE: 2021/8/12 15:15
 */
public class Test {

    public static void main(String[] args) {
        AbstractPhoneFactory factory = new PhoneFactory();
        Phone phone = factory.newPhone(AndroidPhone.class);
        phone.show();
        phone.showParts();
        System.out.println("================");
        Phone phone1 = factory.newPhone(ApplePhone.class);
        phone1.show();
        phone1.showParts();
    }

}
